<%--
  Created by IntelliJ IDEA.
  User: 宋杰
  Date: 2019/9/19
  Time: 10:46
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
	<title>成绩单</title>
	<jsp:include page="${pageContext.request.contextPath}/layout/_imports.jsp"></jsp:include>
	<style>
		.grades {
			text-align: center
		}

		.scores {
			padding-left: 500px
		}
	</style>
</head>
<body>
	<jsp:include page="${pageContext.request.contextPath}/layout/_nav.jsp"></jsp:include>
	<div class="grades" style="color:red">
		<c:choose>
			<c:when test="${!user.isConfirm}">
				<c:out value="你还没有考完试哦"></c:out>
			</c:when>
			<c:otherwise>
				<h2>Hi!${user.username} Your Score is ${user.score}</h2>
				<div class="scores" style="color: chocolate">
					<c:forEach var="i" items="${user.getAllItem()}" varStatus="status">
						<c:out value="您的第${status.count}题"></c:out>
						<c:choose>
							<c:when test="${i.isRight()}">对啦,得分${i.score}分</c:when>
							<c:otherwise>错啦,得分0分</c:otherwise>
						</c:choose>
						<br>
					</c:forEach>
				</div>
			</c:otherwise>
		</c:choose>
	</div>
</body>
</html>
